<template>
    <div class="container">
        <div class="iconWrapper">
            <img src="@/assets/imgs/sys/pay-success.png" alt="" />
            申请提交成功
        </div>
        <div class="info">1、信息校验通过后，法人将收到消息提示。</div>
        <div class="info">2、法人需在24小时内点击消息，进行身份证信息与人脸识别信息收集。</div>
        <div class="info">3、信息收集完毕，验证通过后，将自动创建已认证的小程序。</div>
        <div class="info">
            4、法人将收到设置小程序登录邮箱和密码的微信消息提醒，可点击提醒前往设置，或直接搜索“<span>小程序助手</span>”小程序进行邮箱密码设置。
        </div>
        <div class="arrWrapper" v-for="item in Data.arrList" :key="item.createdAt">
            <div class="time">
                <div>时间</div>
                <span v-if="item.commitAt">提交时间：{{ item.commitAt }}</span>
                <span v-if="item.updatedAt">更新时间：{{ item.updatedAt }}</span>
                <span v-if="item.createdAt">创建时间：{{ item.createdAt }}</span>
            </div>
            <div class="info">
                <div>提交信息</div>
                <span>法人姓名：{{ item.legalPersonName }}</span>
                <span>法人微信号：{{ item.legalPersonWechat }}</span>
                <span>企业名称：{{ item.businessName }}</span>
            </div>
            <div class="status">
                <div>状态</div>
                <!-- 1审核中2通过3失败 -->
                <span :class="[item.status === 1 && 'auth', item.status === 3 && 'fail']">
                    <img v-if="item.status === 3" src="@/assets/imgs/sys/auth-fail.png" alt="" />
                    <img v-if="item.status === 1" src="@/assets/imgs/sys/auth-doing.png" alt="" />
                    {{ item.statusDesc }}
                </span>
                <span v-if="item.status === 3">失败原因：{{ item.failReason }}</span>
                <span v-if="item.status === 1">待法人操作认证</span>
            </div>
        </div>
        <div class="footer">
            <el-button class="btn" type="primary" @click="submitHandler">再次发起</el-button>
        </div>
    </div>
</template>
<script setup>
import { reactive, onMounted } from 'vue';
import request from '@/request';
const emit = defineEmits(['submit']);
const Data = reactive({
    arrList: []
});
const submitHandler = () => {
    emit('submit');
};
onMounted(() => {
    request('miniappSetCompanyLogServ').then(res => {
        Data.arrList = res.data.list || [];
    });
});
</script>
<style lang="scss" scoped>
.container {
    padding-top: 16px;
    position: relative;
}
.iconWrapper {
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #33302d;
    line-height: 22px;
    img {
        width: 16px;
        height: 16px;
        margin-bottom: 2px;
        vertical-align: middle;
    }
}
.info {
    font-size: 14px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #666666;
    line-height: 20px;
    span {
        color: #33302d;
    }
}
.arrWrapper {
    margin-top: 24px;
    display: flex;
    padding-bottom: 16px;
    border: 1px solid #eaeaea;
    > div {
        flex: 1;
        display: flex;
        flex-direction: column;
        > div {
            padding: 14px 56px;
            background: #f9f9f9;
            margin-bottom: 16px;
        }
        span {
            display: flex;
            align-items: center;
            padding: 8px 56px;
            display: flex;
            font-size: 14px;
            font-weight: 400;
            color: #33302d;
            line-height: 20px;
            img {
                width: 14px;
                height: 14px;
                margin-right: 4px;
            }
        }
        .auth {
            color: #4a90e2;
        }
        .fail {
            color: #fe292b;
        }
    }
}
.footer {
    // position: fixed;
    // bottom: 16px;
    // width: calc(100% - 150px);
    // height: 80px;
    // background: #ffffff;
}
.btn {
    width: 88px;
    margin-top: 24px;
}
</style>
